Page({
    data: {
        headsmall: ''
    },
    onLoad: function (e) {
        var that = this;
        wx.request({
            url: 'https://mb.800151.com/phalapi/Public/applet/?service=demo.getCode',
            data: '',
            success: function (e) {
                if (e.statusCode != 200) {//失败吐司
                    wx.showModal({
                        title: '错误提示',
                        content: e.errMsg,
                        showCancel: false
                    });
                }
                console.log(e);
                console.log(e.data.data.headsmall);
                that.setData({
                    headsmall: e.data.data.headsmall
                })
            }
        })
    },
    indexClick: function (e) {
        wx.redirectTo({
            url: '/pages/index/index'
        })
    }


});